﻿<@override name="head">
<title>广告主管理</title>
<script type="text/javascript" src="${ctx}/assets/js/lib/bootstrap.min.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/lib/bootbox.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/common/table.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/advertiser/advertiser.js"></script>
</@override> 
<@override name="body">
<div id=content_bg>
<#include "/main/home/common.ftl"/>
    <div id="pagecontent">
   		<div id="content">
   			<div id="navDiv">
				<ul id="navDiv_ul">
					<li><i class="icon-home"></i></li>
					<li><a href="${ctx}/advertiser/main/dashboard">首页</a></li>
					<li><i class="icon-angle-right"></i></li>
				    <li class="navDiv_currentLi">广告主管理</li>
				</ul>  
 			</div>
 			<form id="myform" action="${ctx}/advertiser/main/ad/advertiser/list" method="post">
 				<input type="hidden" id="status" name="status" value="${status!}"/>
 				<input type="hidden" id="industryId" name="industryId" value="${industryId!}"/>
	 			<div id="selectBar_industry" class="selectBar">
		 			<span>行业：</span>
		 			<div class="son_selectBar">
						<a value="0">全部</a>
					</div>
			    </div>
			    <div id="selectBar_status" class="selectBar">
	 				<span>状态：</span>
					<a value="2">全部</a>
					<a value="0">正常</a>
					<a value="1">停用</a>
			    </div>
			    <div id="navButtons_other">
					<div id="button">					
						<a href="${ctx}/advertiser/main/ad/advertiser/create" class="btn2">创建广告主</a>
						<a class="btn2" id="all-btn-enable">批量开启</a>
						<a class="btn2" id="all-btn-disable">批量停用</a>
						<a class="btn2" id="all-btn-delete">批量删除</a>
					</div>
					<div id="searchValueDiv">
						<input type="hidden" id="page" name="page" value="${pager.page}"/>
						<input id="searchValue" type="text" name="searchValue" value="${searchValue!}" tabindex="1" placeholder="请输入广告主名称"/>
						<input id="serachData_img" type="submit" value=""/>
					</div>
				</div>
				<div class="scrollTable">
					<table border="1" class="tableFig">
						<thead>
							<tr class="theadTr">
				            	<th class="theadTh" style="width:5%;"><div class="checkboxStyleTh"></div></th>
				                <th class="theadTh" style="width:5%;">ID</th>
				                <th class="theadTh" style="width:13%;">广告主名称</th>
				                <th class="theadTh" style="width:9%;">行业</th>
				                <th class="theadTh" style="width:9%;">订单</th>
				                <th class="theadTh" style="width:14%;">最后更新日期</th>
				                <th class="theadTh" style="width:9%;">状态</th>
				                <th class="theadTh" style="width:41%;">操作</th>
				            </tr> 
						</thead>
						<tbody>
							<#if advertiserList ??>
							<#list advertiserList as advertiser>
								<tr id="tbodyTr">
									<td class="tbodyTd"><div class="checkboxStyleTd" id="${advertiser.id!}"></div></td>
									<td class="tbodyTd">${advertiser.id!}</td>
									<td class="tbodyTd">${advertiser.name!}</td>
									<td class="tbodyTd">${advertiser.industryName!}</td>
									<td class="tbodyTd"><a href="${ctx}/advertiser/main/ad/order?advertiserId=${advertiser.id}&advertiserName=${advertiser.name}" class="tableTdStyle">${advertiser.orderNum!}个订单</a></td>
									<td class="tbodyTd"><a href="${ctx}/advertiser/main/ad/advertiser/update?advertiserId=${advertiser.id}" class="tableTdStyle">${advertiser.updated!?datetime}</a></td>
									<td class="tbodyTd">
										<label class="switch">
											<input type="checkbox" <#if advertiser.status==0>checked="checked"</#if>
											value="${advertiser.id!}">
											<span></span>
										</label>
										<label class="switchText"><#if advertiser.status==0>正常<#else>停用</#if></label>
									</td>
									<td class="tbodyTd">
										<div id="listButtons">
											<a href="${ctx}/advertiser/main/ad/advertiser/edit/${advertiser.id!}" class="btn3">编辑</a>
											<a href="${ctx}/advertiser/main/ad/report/advertiser-report?jumpway=get&selectedadvertiserId=${advertiser.id!}&selectedadvertiserName=${advertiser.name}" class="btn3">查看报表</a>
											<a id="btn-delete" value=${advertiser.id!} class="btn3 btn-delete">删除</a>
										</div>
									</td>
								</tr>
							</#list>
							</#if>
						</tbody>
					</table>
				</div>
				<div id="exportReport">
					<a id="exportExcel" class="btn_export" href="javascript:void(0);" onclick="exportExcel_list()">导出Excel</a>
				</div>
				<div id="pageDiv">
					<#include "/common/pagination/simple.ftl"/>
				</div>
			</form>
		</div>
	</div>
</div>
</@override>
<@extends name="/common/simple.ftl"/>